package com.bi.bitest.bao.entity.AlbumDetail;

import com.bi.bitest.bao.entity.Parsable;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.List;

/**
 * Created
 * Author:bi[FR]
 * Date:15-10-23
 */
public class Album_AlbumDetail implements Parsable {
    private long albumId;
    private String title;
    private String coverLarge;
    private String nickname;
    private String avatarPath;
    private String intro;
    private String tags;
    private long tracks;
    private boolean isFavorite;
    private long playTimes;

    private List<Tracks>list;

    @Override
    public void parseJSON(JSONObject json) throws JSONException {

        albumId=json.getLong("albumId");
        title=json.getString("title");
        coverLarge=json.getString("coverLarge");
        nickname=json.getString("nickname");
        avatarPath=json.getString("avatarPath");
        intro=json.optString("intro");
        tags=json.optString("tags");
        tracks=json.getLong("tracks");
        isFavorite=json.optBoolean("isFavorite");
        playTimes=json.optLong("playTimes");
    }

    public List<Tracks> getList() {
        return list;
    }

    public void setList(List<Tracks> list) {
        this.list = list;
    }

    public String getAvatarPath() {
        return avatarPath;
    }

    public void setAvatarPath(String avatarPath) {
        this.avatarPath = avatarPath;
    }

    public long getAlbumId() {
        return albumId;
    }

    public void setAlbumId(long albumId) {
        this.albumId = albumId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCoverLarge() {
        return coverLarge;
    }

    public void setCoverLarge(String coverLarge) {
        this.coverLarge = coverLarge;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public long getTracks() {
        return tracks;
    }

    public void setTracks(long tracks) {
        this.tracks = tracks;
    }

    public boolean isFavorite() {
        return isFavorite;
    }

    public void setIsFavorite(boolean isFavorite) {
        this.isFavorite = isFavorite;
    }

    public long getPlayTimes() {
        return playTimes;
    }

    public void setPlayTimes(long playTimes) {
        this.playTimes = playTimes;
    }

    @Override
    public String toString() {
        return "Album_AlbumDetail{" +
                "albumId=" + albumId +
                ", title='" + title + '\'' +
                ", coverLarge='" + coverLarge + '\'' +
                ", nickname='" + nickname + '\'' +
                ", avatarPath='" + avatarPath + '\'' +
                ", intro='" + intro + '\'' +
                ", tags='" + tags + '\'' +
                ", tracks=" + tracks +
                ", isFavorite=" + isFavorite +
                ", playTimes=" + playTimes +
                ", list=" + list +
                '}';
    }
}
